package runner;

import generator.CourseBank;
import generator.CourseBankGenerator;

import java.util.List;
import java.util.Random;

import core.course.Course;

public class AlgorithmRunner
{
	public enum SearchAlgorithm
	{
		BASIC_HILL_CLIMBING,
	};
	
	public static void main(String[] args)
	{
//		ILog log = new Logger();
//		
//		String[] columnHeaders = new String[] {"colA" , "colB"};
//		for(int j=0; j<10; ++j){			
//			log.markStart(columnHeaders);
//			for(int i=0; i<10; ++i) 
//			{
//				log.writeLine(new String[] {"valA" , "valB"});			
//			}
//			log.markEnd();
//		}
		
		
		AlgorithmRunner algorithmRunner = new AlgorithmRunner();
		algorithmRunner.testAlgorithm(SearchAlgorithm.BASIC_HILL_CLIMBING);

	}
	public static final int NUM_COURSES = 100;
	public static final int NUM_MAX_HEURISTIC_CALLS = 100;
	List<Course> m_CourseSpace;
	
	public void testAlgorithm(SearchAlgorithm searchAlgorithm)
	{
		// create space
		createCoursesSpace();
		
		// test the algorithm
		switch (searchAlgorithm)
		{
			case BASIC_HILL_CLIMBING:
				testAlgorithmBasicHC();
				break;
	
			default:
				break;
		}
	}
	
	
	private void testAlgorithmBasicHC()
	{
		// test easy1 heuristic
//		UtilEasy1 utilEasy1 = new UtilEasy1();
//		BasicHillClimbing<TimeTable> basicHillClimbing = 
//			new BasicHillClimbing<TimeTable>(NUM_MAX_HEURISTIC_CALLS, utilEasy1);
//		
//		TimeTable timeTable = new TimeTable(m_CourseSpace);
//	
//		IState<TimeTable> result = basicHillClimbing.start(timeTable);
//		double value = utilEasy1.getValue(result);
//		int x;
//		x = 10;
		
		
	}


	private void createCoursesSpace()
	{
		CourseBank bank = new CourseBankGenerator().generateCourseBank(
				new Random(), NUM_COURSES);
		m_CourseSpace = bank.getCourses();
	}
}
